//
//  YXAddViewController.m
//  YXImageBrowserDemo
//
//  Created by guo peng huang on 2021/5/23.
//

#import "YXAddViewController.h"
#import "YXTestViewController.h"

@interface YXAddViewController ()

@end

@implementation YXAddViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)initData {
    NSMutableArray *array = [NSMutableArray array];
    [array addObjectsFromArray:[YXBaseFileManager yx_imageURLs]];
    [array addObjectsFromArray:[YXBaseFileManager yx_imageNames]];
    [array addObjectsFromArray:[YXBaseFileManager yx_videos]];
    self.dataArray = array;
}

+ (NSString *)yx_title {
    return @"添加到控制器使用";
}

- (void)yx_selectedIndex:(NSInteger)index {
    //使用控制器展示图片浏览器
    YXTestViewController *browser = [[YXTestViewController alloc] init];
    browser.dataArray = self.dataArray;
    browser.selectIndex = index;
    [self.navigationController pushViewController:browser animated:YES];
}

@end
